home *** CD-ROM | disk | FTP | other *** search
Text File | 1987-01-06 | 3.6 KB | 188 lines | [TEXT/EDIT] |
- // OSmisc.h
- // Mac OS Interface defs
- // © Copyright 1984 Consulair Corp, All Rights Reserved.
- // Portions © Copyright Apple Computer, Inc: 1982, 1983, 1984
- // Stanford University, SUMEX project: 1984
- // Requires Macdefs.h
-
- #ifndef OSmiscLoaded
-
- #ifndef MacdefsLoaded
- #include "macdefs.h"
- #endif
-
- #define OSmiscLoaded
-
- #ifdef HFSdefsLoaded
- #Options E
- ####You cannot include OSMisc.h and HFSDefs.h in the same file####
- #endif
-
- // finder constants
-
- #define fHasBundle 32
- #define fInvisible 64
-
- // general queue data structure
-
- struct QE
- {
- struct QE *QLink;
- short QType;
- char QData[1];
- };
-
- #define QElem struct QE
-
- // QType values
-
- #define VType 1
- #define IOQType 2
- #define DrvType 3
- #define EvType 4
- #define FSQType 5
-
- struct QH
- { // QHdr
- short qFlags;
- QElem *qHead;
- QElem *qTail;
- };
-
- #define QHdr struct QH
-
- // Pointer to a Queue Header
-
- typedef QHdr *QHdrPtr;
-
- // QFlags values
-
- #define QInUse 0x80
-
-
- // Vertical Blanking Control Block Queue Element
-
- struct __VB
- { // VBLCntrlBlk
- struct __VB *qLink;
- short qType;
- ProcPtr vblAddr; // service routine
- short vblCount; // for timeout
- short vblPhase; // phase for synchronization
- };
-
- #define VBLTask struct __VB
-
- // Event queue element
-
- struct __EB
- { // evCntrlBlk
- struct __EB *evLink;
- short evType;
- short evWhat; // remainder identical to EventRecord
- long evMessage;
- long evWhen;
- Point evWhere;
- short evModifiers;
- };
-
- #define evCntrlBlk struct __EB
-
- // Driver queue element
-
- struct __DQ
- { // drvQElRec
- long flags;
- struct __DQ *qLink;
- short qType;
- short dQDrive;
- short dQRefNum; // ref num of drvr to handle this drive
- short dQFSID; // file system id
- short dQDrvSize; // size of drive in 512 blocks (but not 1&2)
- };
-
- #define drvQElRec struct __DQ
-
- // 20 bytes of system parameter area
-
- struct __SP
- { // SysParmType
- long ValidOdom; // hi byte, validation field (0xa7)
- // lo 3 bytes, odometer
- short PortA; // port A config
- short PortB;
- long Alarm; // alarm time
- short Font; // default font id
- short KbdPrint; // hi byte, kbd repeat
- // high nibble = thresh in 4/60ths
- // low nibble = rates in 2/60ths
- // low byte = print stuff
- short VolClik; // low 3 bits of high byte = volume control
- // hi nib of low byte = double time in 4/60ths
- // lo nib of low byte = caret blink in 4/60ths
- short Misc; // high byte = international specification
- // MEEC CCCC PSKB FFHH
- // M = english/metric
- // E = extra
- // C = country code
- // P = paranoia level
- // S = mouse scaling
- // K = key click
- // B = boot disk
- // F = menu flash
- // H = help level
- };
-
- #define SysParmType struct __SP
- typedef SysParmType * SysPPtr;
-
-
- // for Sound Driver
- // for 4-tone sound generation
-
- struct Wave
- {
- char s[256];
- };
-
- #define Wave struct Wave
- typedef Wave * WavePtr;
-
- struct __SS
- { // SoundStruct
- short duration;
- long snd1Rate;
- long snd1Phase;
- long snd2Rate;
- long snd2Phase;
- long snd3Rate;
- long snd3Phase;
- long snd4Rate;
- long snd4Phase;
- WavePtr snd1Wave;
- WavePtr snd2Wave;
- WavePtr snd3Wave;
- WavePtr snd4Wave;
- };
-
- #define SoundStruct struct __SS
- typedef SoundStruct * SndRecPtr;
-
-
- // for date and time
-
- struct Date
- { // DateArray
- short year;
- short month;
- short day;
- short hour;
- short minute;
- short second;
- short dayOfWeek;
- };
-
- #define Date struct Date
-
- #endif
-